import Paging from '../../../../wxjs/Paging.js'
import navToNext from '../../../../wxjs/navToNext.js'
const app = getApp();

var pag = new Paging();

var data = {
  xhx_images: app.xhx_images,
  xhx_route: app.xhx_route,
};

var currentPage = {
  data,
  reqUrl: app.serAddrs.getAllMassageList,
  onLoad,
};

var page = Object.assign({}, pag.func(), navToNext, currentPage);

Page(page);

function onLoad(options) {
  const that = this;
  const type = options && options.type || 1;
  let title = "活动公告";
  that.listParams.manageType = 1;
  if(type == 2){
    title = "平台通知";
    that.listParams.manageType = 2;
  }
  wx.setNavigationBarTitle({
    title,
  })
  that.setData({
    type
  })
  // 初始化
  that.pageListInit();
}